include $(TOPDIR)/rules.mk

PKG_NAME:=upx
PKG_VERSION:=3.96
PKG_RELEASE:=1
PKG_FLAGS:=nonshared

FLAG_ARCH:=amd64_linux

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(FLAG_ARCH)
PKG_SOURCE:=upx-$(PKG_VERSION)-$(FLAG_ARCH).tar.xz
PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)/

# 3.95
#PKG_HASH:=b5d6856b89dd696138ad8c7245a8f0dae4b76f41b5a31c7c43a21bc72c479c4e

PKG_HASH:=ac75f5172c1c530d1b5ce7215ca9e94586c07b675a26af3b97f8421b8b8d413d

include $(INCLUDE_DIR)/package.mk

define Package/upx/default
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=the Ultimate Packer for eXecutables (for x86_64)
  URL:=https://upx.github.io/
endef

define Package/upx/description
	UPX is a free, portable, extendable, high-performance executable packer for several executable formats. Please also see the Wikipedia entry for some more background info.
endef

define Package/upx/conffiles
	
endef

define Package/upx/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/upx $(1)/usr/bin
endef

define Package/upx
	$(call Package/upx/default)
	DEPENDS+=@TARGET_x86_64
endef

define Build/Compile
	ls
endef

define Build/Clean
	ls
endef

$(eval $(call BuildPackage,upx))
